package com.tpc.yaoxpt.main;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class DBModule {
    private StringProperty dbType;

    public final StringProperty dbTypeProperty(){
        if(dbType==null){
            dbType = new SimpleStringProperty("");
        }
        return dbType;
    }

    public final String getDbType(){
        return dbTypeProperty().get();
    }

    public final void setDbType(String dbType){
        this.dbTypeProperty().set(dbType);
    }

    private StringProperty dbIp;

    public final StringProperty dbIpProperty(){
        if(dbIp==null){
            dbIp = new SimpleStringProperty("");
        }
        return dbIp;
    }

    public final String getDbIp(){
        return dbIpProperty().get();
    }

    public final void setDbIp(String dbIp){
        this.dbIpProperty().set(dbIp);
    }

    private StringProperty dbUser;

    public final StringProperty dbUserProperty(){
        if(dbUser==null){
            dbUser = new SimpleStringProperty("");
        }
        return dbUser;
    }

    public final String getDbUser(){
        return dbUserProperty().get();
    }

    public final void setDbUser(String dbUser){
        this.dbUserProperty().set(dbUser);
    }

    private StringProperty dbPassword;

    public final StringProperty dbPasswordProperty(){
        if(dbPassword==null){
            dbPassword = new SimpleStringProperty("");
        }
        return dbPassword;
    }

    public final String getDbPassword(){
        return dbPasswordProperty().get();
    }

    public final void setDbPassword(String dbPassword){
        this.dbPasswordProperty().set(dbPassword);
    }


    private StringProperty dbName;

    public final StringProperty dbNameProperty(){
        if(dbName==null){
            dbName = new SimpleStringProperty("");
        }
        return dbName;
    }

    public final String getDbName(){
        return dbNameProperty().get();
    }

    public final void setDbName(String dbName){
        this.dbNameProperty().set(dbName);
    }

    private StringProperty dbPort;

    public final StringProperty dbPortProperty(){
        if(dbPort==null){
            dbPort = new SimpleStringProperty("");
        }
        return dbPort;
    }

    public final String getDbPort(){
        return dbPortProperty().get();
    }

    public final void setDbPort(String dbPort){
        this.dbPortProperty().set(dbPort);
    }

}
